pdf("histogram.pdf")
data <- read.table("chr1.txt",sep="\t")
k<-dim(data)
p<-seq(1,k[1],1)
#hist(data[,2],breaks=seq(0,38000,100),xlim=c(0,38000),ylim=c(0,100),xlab="Barcode calls count",ylab ="counts",main="Barcode calls")
kk<-hist(data[,2],breaks=seq(min(data[,2]),max(data[,2]),(max(data[,2])-min(data[,2]))/100),plot=FALSE)
seq<-seq(1,100,1)
plot(seq,kk$mids,xlab="percentages",ylab="counts in each percentage",main = "histogram for the counts of the bins")
#plot(p,data[,2],pch=".",xlab="regions",ylab="read counts in that region")
#barplot(data[,2], main="Barplot", xlab="position", ylab="Readcount in that bin", names.arg=data[,1])
dev.off()
